package zhouzhouyongche.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(uniqueConstraints={@UniqueConstraint(columnNames="day")})
@DynamicInsert
@DynamicUpdate
public class Day implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private int id;
	
	private int day;
	
	@Id
    @GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "identity")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	
}
